package com.cimr.comm.service;

import com.cimr.comm.po.Role;

import java.util.List;
import java.util.Set;

/**
 * Created by liqi on 2017/8/2.
 */
public interface RoleService {
    Set<String> findRoleByUserId(String userId);

    List<Role> selectList(String roleKey);

    Role getRoleById(String id);
    List<Role> getRoleListByKey(String roleKey);
    List<Role> getRoleListWithName(String roleName, String[] groupIds);
    List<Role> getRoleListWithNameByUserId(String roleName, String[] groupIds, String userId);

    int insertRole(String id,
                          String roleKey,
                          String name,
                          String comment,
                          Float orderId,
                          String groupId,
                          String groupName);

    int updateRole(String id,
                          String roleKey,
                          String roleName,
                          String comment,
                          Float orderId,
                          String groupId,
                          String groupName);

    int updateOrderId(String id,
                   Float orderId);

    int deleteRoleById(String id);

    List<Role> getRoleListByUsername(String username);
    List<Role> getRoleListByUserId(String userId);

    int saveRoleAndMenus(String roleId, String[] menuIds);
    int saveRoleAndOperations(String roleId, String[] menuIds);

    List<Role> getRoleListByGroupId(String groupId);
}
